/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1640762737710_869';

  // add your middleware config here
  config.middleware = [];

  // scrf 伪造跨域
  // CSRF:false，//取消安全措施,关闭CSRF检测
  config.security = {
    csrf: {
      enable: false,
    }
  }
  // add your user config here
  const userConfig = {
    // myAppName: 'egg',
  };

  //mysqlConfig
  config.mysql={
    app:true,
    agent:false,//代理
    client:{
      host:'localhost',//地址
      port:"3306",//端口
      user:"root",//用户名
      password:"123456",//密码
      database:"sys",//数据库名称
    }
  }

  // config.m

  return {
    ...config,
    ...userConfig,
  };
};
